package com.study.thymeleaf.core;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class BasicEntity {
    @TableField(exist = false)
    private Integer currentPage = 1;

    @TableField(exist = false)
    private Integer pageSize = 10;

    @TableField(exist = false)
    private String sortInfo;

    @TableField(exist = false)
    private String msg;

    public <T> IPage<T> parse() {
        return new Page<>(getCurrentPage(), getPageSize());
    }

}
